package com.kaishengit.util;

import java.io.UnsupportedEncodingException;

public class StringUtil {
	
	public static String ISOtoUTF(String str) {
		
		
			try {
				if(isNotEmpty(str)){
					
				return new String(str.getBytes("ISO8859-1"),"UTF-8");
				
				} 
				return "";
			
			}catch (UnsupportedEncodingException e) {
				
				e.printStackTrace();
				return "";
			
		}
		

	}

	public static boolean isNotEmpty(String str) {
		
		return !isEmpty(str);
	}

	public static boolean isEmpty(String str) {
		if(str == null || "".equals(str)){
			
			return true;
		}else{
			return false;
		}
			
		
	}

}
